New function to improve the accessibility of tooltips. (#114851, Padraig
authorMatthias Clasen <maclas@gmx.de>
Thu, 12 Feb 2004 22:57:56 +0000 (22:57 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Thu, 12 Feb 2004 22:57:56 +0000 (22:57 +0000)
Thu Feb 12 23:55:08 2004  Matthias Clasen  <maclas@gmx.de>

* gtk/gtktooltips.h:
* gtk/gtktooltips.c (gtk_tooltips_get_info_from_tip_window): New
function to improve the accessibility of tooltips.  (#114851,
Padraig O'Briain)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
docs/reference/ChangeLog
docs/reference/gtk/gtk-sections.txt
gtk/gtktooltips.c
gtk/gtktooltips.h

index d384d49c6d20f4f0973c3fad1f35087e1103e228..83a81acaadf7376d55d3397978903f15e020c151 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+Thu Feb 12 23:55:08 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtktooltips.h:
+       * gtk/gtktooltips.c (gtk_tooltips_get_info_from_tip_window): New 
+       function to improve the accessibility of tooltips.  (#114851, 
+       Padraig O'Briain)
+
+Thu Feb 12 23:16:04 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcombobox.c (gtk_combo_box_popup): 
+       * gtk/gtkcombobox.c (gtk_combo_box_popdown): Make these public and
+       add docs.  (#132847)
+
 Thu Feb 12 11:05:16 2004  Manish Singh  <yosh@gimp.org>
 
        * gdk/x11/gdkproperty-x11.c (gdk_property_get): Assign xtype using
index d384d49c6d20f4f0973c3fad1f35087e1103e228..83a81acaadf7376d55d3397978903f15e020c151 100644 (file)
@@ -1,3 +1,16 @@
+Thu Feb 12 23:55:08 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtktooltips.h:
+       * gtk/gtktooltips.c (gtk_tooltips_get_info_from_tip_window): New 
+       function to improve the accessibility of tooltips.  (#114851, 
+       Padraig O'Briain)
+
+Thu Feb 12 23:16:04 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcombobox.c (gtk_combo_box_popup): 
+       * gtk/gtkcombobox.c (gtk_combo_box_popdown): Make these public and
+       add docs.  (#132847)
+
 Thu Feb 12 11:05:16 2004  Manish Singh  <yosh@gimp.org>
 
        * gdk/x11/gdkproperty-x11.c (gdk_property_get): Assign xtype using
index d384d49c6d20f4f0973c3fad1f35087e1103e228..83a81acaadf7376d55d3397978903f15e020c151 100644 (file)
@@ -1,3 +1,16 @@
+Thu Feb 12 23:55:08 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtktooltips.h:
+       * gtk/gtktooltips.c (gtk_tooltips_get_info_from_tip_window): New 
+       function to improve the accessibility of tooltips.  (#114851, 
+       Padraig O'Briain)
+
+Thu Feb 12 23:16:04 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcombobox.c (gtk_combo_box_popup): 
+       * gtk/gtkcombobox.c (gtk_combo_box_popdown): Make these public and
+       add docs.  (#132847)
+
 Thu Feb 12 11:05:16 2004  Manish Singh  <yosh@gimp.org>
 
        * gdk/x11/gdkproperty-x11.c (gdk_property_get): Assign xtype using
index d384d49c6d20f4f0973c3fad1f35087e1103e228..83a81acaadf7376d55d3397978903f15e020c151 100644 (file)
@@ -1,3 +1,16 @@
+Thu Feb 12 23:55:08 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtktooltips.h:
+       * gtk/gtktooltips.c (gtk_tooltips_get_info_from_tip_window): New 
+       function to improve the accessibility of tooltips.  (#114851, 
+       Padraig O'Briain)
+
+Thu Feb 12 23:16:04 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcombobox.c (gtk_combo_box_popup): 
+       * gtk/gtkcombobox.c (gtk_combo_box_popdown): Make these public and
+       add docs.  (#132847)
+
 Thu Feb 12 11:05:16 2004  Manish Singh  <yosh@gimp.org>
 
        * gdk/x11/gdkproperty-x11.c (gdk_property_get): Assign xtype using
index d384d49c6d20f4f0973c3fad1f35087e1103e228..83a81acaadf7376d55d3397978903f15e020c151 100644 (file)
@@ -1,3 +1,16 @@
+Thu Feb 12 23:55:08 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtktooltips.h:
+       * gtk/gtktooltips.c (gtk_tooltips_get_info_from_tip_window): New 
+       function to improve the accessibility of tooltips.  (#114851, 
+       Padraig O'Briain)
+
+Thu Feb 12 23:16:04 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcombobox.c (gtk_combo_box_popup): 
+       * gtk/gtkcombobox.c (gtk_combo_box_popdown): Make these public and
+       add docs.  (#132847)
+
 Thu Feb 12 11:05:16 2004  Manish Singh  <yosh@gimp.org>
 
        * gdk/x11/gdkproperty-x11.c (gdk_property_get): Assign xtype using
index ebe2c7c1c43e6a42175441850efe7c72a07574a7..84f3fedfb911d96ef5f0e168d5a1addfb0a417f8 100644 (file)
@@ -1,3 +1,7 @@
+Thu Feb 12 23:56:12 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtk-sections.txt: Add gtk_tooltips_get_info_from_tip_window.
+
 Thu Feb 12 23:30:25 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gtk/gtk-sections.txt: Add gtk_combo_box_{popup,popdown}.
index 420448226ba80eae56a488ff41d5398845864f24..d6908af03aad8840f1e2f91a208f2645a4cb5101 100644 (file)
@@ -3388,6 +3388,8 @@ gtk_tooltips_set_delay
 gtk_tooltips_set_tip
 gtk_tooltips_data_get
 gtk_tooltips_force_window
+gtk_tooltips_get_info_from_tip_window
+
 <SUBSECTION Standard>
 GTK_TOOLTIPS
 GTK_IS_TOOLTIPS
index 97bb782c7b1397370cfbc7560d94bbffa7ad210f..e747664e48fa5aab82195178f8a645b64c0c27a6 100644 (file)
@@ -68,6 +68,7 @@ static gboolean get_keyboard_mode          (GtkWidget   *widget);
 
 static GtkObjectClass *parent_class;
 static const gchar  *tooltips_data_key = "_GtkTooltipsData";
+static const gchar  *tooltips_info_key = "_GtkTooltipsInfo";
 
 GType
 gtk_tooltips_get_type (void)
@@ -407,6 +408,8 @@ gtk_tooltips_draw_tips (GtkTooltips *tooltips)
   style = tooltips->tip_window->style;
   
   widget = tooltips->active_tips_data->widget;
+  g_object_set_data (G_OBJECT (tooltips->tip_window), tooltips_info_key,
+                     tooltips);
 
   keyboard_mode = get_keyboard_mode (widget);
 
@@ -746,3 +749,42 @@ _gtk_tooltips_toggle_keyboard_mode (GtkWidget *widget)
     start_keyboard_mode (widget);
 }
 
+/**
+ * gtk_tooltips_get_info_from_tip_window:
+ * @tip_window: a #GtkWindow 
+ * @tooltips: the return location for the tooltips which are displayed 
+ *    in @tip_window, or %NULL
+ * @current_widget: the return location for the widget whose tooltips 
+ *    are displayed, or %NULL
+ * 
+ * Determines the tooltips and the widget they belong to from the window in 
+ * which they are displayed. 
+ *
+ * This function is mostly intended for use by accessibility technologies;
+ * applications should have little use for it.
+ * 
+ * Return value: %TRUE if @tip_window is displaying tooltips, otherwise %FALSE.
+ *
+ * Since: 2.4
+ **/
+gboolean
+gtk_tooltips_get_info_from_tip_window (GtkWindow    *tip_window,
+                                       GtkTooltips **tooltips,
+                                       GtkWidget   **current_widget)
+{
+  GtkTooltips  *current_tooltips;  
+  gboolean has_tips;
+
+  g_return_val_if_fail (GTK_IS_WINDOW (tip_window), FALSE);
+
+  current_tooltips = g_object_get_data (G_OBJECT (tip_window), tooltips_info_key);
+
+  has_tips = current_tooltips != NULL;
+
+  if (tooltips)
+    *tooltips = current_tooltips;
+  if (current_widget)
+    *current_widget = has_tips ? current_tooltips->active_tips_data->widget : NULL;
+
+  return has_tips;
+}
index bd0b4047713361dd7d8e925d9d14965ef68425af..c0ad3b1aa22f34cc48809d66519beb0ead233245 100644 (file)
@@ -28,6 +28,7 @@
 #define __GTK_TOOLTIPS_H__
 
 #include <gtk/gtkwidget.h>
+#include <gtk/gtkwindow.h>
 
 
 #ifdef __cplusplus
@@ -102,6 +103,10 @@ void             gtk_tooltips_force_window (GtkTooltips   *tooltips);
 
 void             _gtk_tooltips_toggle_keyboard_mode (GtkWidget *widget);
 
+gboolean         gtk_tooltips_get_info_from_tip_window (GtkWindow    *tip_window,
+                                                        GtkTooltips **tooltips,
+                                                        GtkWidget   **current_widget);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */